package com.autumn.mq.rabbit;

/**
 * 队列 Direct 模式声明工厂(主要兼容原C#版的格式)
 * 
 * @author 老码农
 *         <p>
 *         Description
 *         </p>
 * @date 2017-12-10 22:25:25
 */
@Deprecated
public class RabbitDirectExchangeQueueDeclareFactory extends RabbitDirectQueueDeclareFactory {

	private final static String EXCHANGE_EXCHANGE = "exchange";

	/**
	 * 实例化
	 * 
	 * @param name
	 *            名称
	 */
	public RabbitDirectExchangeQueueDeclareFactory(String name) {
		super(name);
	}

	/**
	 * 实例化
	 * 
	 * @param name
	 *            名称
	 * @param durable
	 *            是否持久化
	 */
	public RabbitDirectExchangeQueueDeclareFactory(String name, boolean durable) {
		super(name, durable, false, false);
	}

	/**
	 * 实例化
	 * 
	 * @param name
	 *            名称
	 * @param durable
	 *            是否持久化
	 * @param exclusive
	 *            是否排它性，即只有本实例能访问
	 * @param autoDelete
	 *            是否自动删除
	 */
	public RabbitDirectExchangeQueueDeclareFactory(String name, boolean durable, boolean exclusive,
			boolean autoDelete) {
		super(name, durable, exclusive, autoDelete);
	}

	@Override
	public String getExchangeName() {
		return this.getName() + "." + EXCHANGE_EXCHANGE;
	}

	@Override
	public String getDelayQueueExchangeName() {
		return DELAY + this.getExchangeName();
	}

}
